<html>
<head>
<title>Synchronet JavaScript Object Model Reference</title>
<STYLE>
	OL LI                { cursor: hand; }
	UL LI                { display: none;list-style: square; }
	.showList LI         { display: list-item; }
</STYLE>
</head>
<body>
<font face=arial,helvetica>
<h1>Synchronet JavaScript Object Model Reference</h1>
Generated for <b>Synchronet v3.12a</b>, compiled Dec 31 2004 01:54
<br><font size=-1>
Includes Properties and Methods added or substantially modified in Synchronet v3.12 only.
</font>
<ol type=square>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#global"><b>global</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#global_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#global_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#js"><b>js</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#js_methods>methods</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#system"><b>system</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#system_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#system_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#server"><b>server</b></a> object
<ul>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#client"><b>client</b></a> object
<ul>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#user"><b>user</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#user_methods>methods</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#bbs"><b>bbs</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#bbs_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#bbs_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#console"><b>console</b></a> object
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#console_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#console_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#msg_area"><b>msg_area</b></a> object
<ul>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#file_area"><b>file_area</b></a> object
<ul>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#xtrn_area"><b>xtrn_area</b></a> object
<ul>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#MsgBase"><b>MsgBase</b></a> class
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#MsgBase_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#MsgBase_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#File"><b>File</b></a> class
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#File_methods>methods</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#Queue"><b>Queue</b></a> class
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#Queue_methods>methods</a>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#Queue_properties>properties</a>
</ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
[+] &nbsp<a href="#Socket"><b>Socket</b></a> class
<ul>
<li onclick = 'this.className = (this.className == "showList") ? "defaultStyles" : "showList";'
	onselectstart = 'event.returnValue = false;'>
<a href=#Socket_methods>methods</a>
</ul>
</ol>
<h2><a name=global>global object</a>
<br><font size=-1>Top-level functions and properties (common to all servers and services)</font>
</h2>
<table border=1 width=100%>
<caption align=left><b><tt>global</tt>
<a name=global_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>load</b><td>undefined<td><tt>load([<i>bool</i> background or <i>object</i> scope,] <i>string</i> filename [,args])
<td>load and execute a JavaScript module (<i>filename</i>), optionally specifying a target <i>scope</i> object (default: <i>this</i>) and a list of arguments to pass to the module (as <i>argv</i>). Returns the result (last executed statement) of the executed script or a newly created <i>Queue</i> object if <i>background</i> is <i>true</i>).<br><br><b>Background</b> (added in v3.12):<br>If <i>background</i> is <i>true</i>, the loaded script runs in the background (in a child thread) but may communicate with the parent script/thread by reading from and/or writing to the <i>parent_queue</i> (an automatically created <i>Queue</i> object). The result (last executed statement) of the executed script will also be automatically written to the <i>parent_queue</i> which may be read later by the parent script.
<tr valign=top><td><b>backslash</b><td>string<td><tt>backslash(string path)
<td>returns directory path with trailing (platform-specific) path delimeter (i.e. "slash" or "backslash")
<tr valign=top><td><b>file_cfgname</b><td>string<td><tt>file_cfgname(string path, filename)
<td>returns completed configuration filename from supplied <i>path</i> and <i>filename</i>, optionally including the local hostname (e.g. <tt>path/file.<i>host</i>.<i>domain</i>.ext</tt> or <tt>path/file.<i>host</i>.ext</tt>) if such a variation of the filename exists
<tr valign=top><td><b>file_mutex</b><td>boolean<td><tt>file_mutex(string filename [,text])
<td>attempts to create an exclusive (e.g. lock) file, optionally with the contents of <i>text</i>
<tr valign=top><td><b>netaddr_type</b><td>number<td><tt>netaddr_type(string email_address)
<td>returns the proper message <i>net_type</i> for the specified <i>email_address</i>, (e.g. <tt>NET_INTERNET</tt> for Internet e-mail or <tt>NET_NONE</tt> for local e-mail)
<tr valign=top><td><b>list_named_queues</b><td>array<td><tt>list_named_queues()
<td>returns an array of <i>named queues</i> (created with the <i>Queue</i> constructor)
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>global</tt>
<a name=global_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr><td><b>argc</b><td>number<td>number of arguments passed to the script</td>
<tr><td><b>argv</b><td>array<td>array of argument strings (argv.length == argc)</td>
<tr><td><b>errno</b><td>number<td>last system error number</td>
<tr><td><b>errno_str</b><td>string<td>description of last system error</td>
</table>
<h2><a name=js>js object</a>
<br><font size=-1>JavaScript execution and garbage collection control object</font>
</h2>
<table border=1 width=100%>
<caption align=left><b><tt>js</tt>
<a name=js_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
</table>
<h2><a name=system>system object</a>
<br><font size=-1>Global system-related properties and methods</font>
</h2>
<table border=1 width=100%>
<caption align=left><b><tt>system</tt>
<a name=system_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>system</tt>
<a name=system_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>temp_path</b><td>string
<td>platform-specific temporary file directory
</table>
<h2><a name=server>server object</a>
<br><font size=-1>Server-specifc properties</font>
</h2>
<h2><a name=client>client object</a>
<br><font size=-1>Represents a TCP/IP client session</font>
</h2>
<h2><a name=user>user object</a>
<br><font size=-1>Instance of <i>User</i> class, representing current user online</font>
</h2>
<p>To create a new user object: <tt>var u = new User(<i>number</i>)</tt></p>
<table border=1 width=100%>
<caption align=left><b><tt>user</tt>
<a name=user_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
</table>
<h2><a name=bbs>bbs object</a>
<br><font size=-1>Controls the Telnet/RLogin BBS experience</font>
</h2>
<table border=1 width=100%>
<caption align=left><b><tt>bbs</tt>
<a name=bbs_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>bbs</tt>
<a name=bbs_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>errorlevel</b><td>number
<td>error level returned from last executed external program
<tr valign=top><td><b>msg_thread_back</b><td>number
<td>message thread, back message number (AKA msg_thread_orig)
</table>
<h2><a name=console>console object</a>
<br><font size=-1>Controls the user's Telnet/RLogin terminal</font>
</h2>
<table border=1 width=100%>
<caption align=left><b><tt>console</tt>
<a name=console_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>uselect</b><td>number<td><tt>console.uselect([number, string title, string item, string ars])
<td>user selection menu, call for each item, then with no args to display select menu
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>console</tt>
<a name=console_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>input_buffer_level</b><td>number
<td>number of bytes currently in the input buffer (from the remote client) - <small>READ ONLY</small>
<tr valign=top><td><b>input_buffer_space</b><td>number
<td>number of bytes available in the input buffer	- <small>READ ONLY</small>
<tr valign=top><td><b>output_buffer_level</b><td>number
<td>number of bytes currently in the output buffer (from the local server) - <small>READ ONLY</small>
<tr valign=top><td><b>output_buffer_space</b><td>number
<td>number of bytes available in the output buffer - <small>READ ONLY</small>
</table>
<h2><a name=msg_area>msg_area object</a>
<br><font size=-1>Message Areas</font>
</h2>
<h2><a name=file_area>file_area object</a>
<br><font size=-1>File Transfer Areas</font>
</h2>
<h2><a name=xtrn_area>xtrn_area object</a>
<br><font size=-1>External Program Areas</font>
</h2>
<h2><a name=MsgBase>MsgBase class</a>
<br><font size=-1>Class used for accessing message bases</font>
</h2>
<p>To create a new MsgBase object: <tt>var msgbase = new MsgBase('<i>code</i>')</tt><br>where <i>code</i> is a sub-board internal code, or <tt>mail</tt> for the e-mail message base</p>
<table border=1 width=100%>
<caption align=left><b><tt>MsgBase</tt>
<a name=MsgBase_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>get_msg_header</b><td>object<td><tt>MsgBase.get_msg_header([boolean by_offset,] number_or_id [,boolean expand_fields])
<td>returns a specific message header, <i>null</i> on failure. <br><i>New in v3.12:</i> Pass <i>false</i> for the <i>expand_fields</i> argument (default: <i>true</i>) if you will be re-writing the header later with <i>put_msg_header()</i>
<tr valign=top><td><b>save_msg</b><td>boolean<td><tt>MsgBase.save_msg(object header [,client] [,body_text] [,array rcpt_list])
<td>create a new message in message base, the <i>header</i> object may contain the following properties:<br><table><tr><td align=top><tt>subject</tt><td>Message subject <i>(required)</i><tr><td align=top><tt>to</tt><td>Recipient's name <i>(required)</i><tr><td align=top><tt>to_ext</tt><td>Recipient's user number (for local e-mail)<tr><td align=top><tt>to_org</tt><td>Recipient's organization<tr><td align=top><tt>to_net_type</tt><td>Recipient's network type (default: 0 for local)<tr><td align=top><tt>to_net_addr</tt><td>Recipient's network address<tr><td align=top><tt>to_agent</tt><td>Recipient's agent type<tr><td align=top><tt>from</tt><td>Sender's name <i>(required)</i><tr><td align=top><tt>from_ext</tt><td>Sender's user number<tr><td align=top><tt>from_org</tt><td>Sender's organization<tr><td align=top><tt>from_net_type</tt><td>Sender's network type (default: 0 for local)<tr><td align=top><tt>from_net_addr</tt><td>Sender's network address<tr><td align=top><tt>from_agent</tt><td>Sender's agent type<tr><td align=top><tt>from_ip_addr</tt><td>Sender's IP address (if available, for security tracking)<tr><td align=top><tt>from_host_name</tt><td>Sender's host name (if available, for security tracking)<tr><td align=top><tt>from_protocol</tt><td>TCP/IP protocol used by sender (if available, for security tracking)<tr><td align=top><tt>from_port</tt><td>TCP/UDP port number used by sender (if available, for security tracking)<tr><td align=top><tt>replyto</tt><td>Replies should be sent to this name<tr><td align=top><tt>replyto_ext</tt><td>Replies should be sent to this user number<tr><td align=top><tt>replyto_org</tt><td>Replies should be sent to organization<tr><td align=top><tt>replyto_net_type</tt><td>Replies should be sent to this network type<tr><td align=top><tt>replyto_net_addr</tt><td>Replies should be sent to this network address<tr><td align=top><tt>replyto_agent</tt><td>Replies should be sent to this agent type<tr><td align=top><tt>id</tt><td>Message's RFC-822 compliant Message-ID<tr><td align=top><tt>reply_id</tt><td>Message's RFC-822 compliant Reply-ID<tr><td align=top><tt>reverse_path</tt><td>Message's SMTP sender address<tr><td align=top><tt>path</tt><td>Messages's NNTP path<tr><td align=top><tt>newsgroups</tt><td>Message's NNTP newsgroups header<tr><td align=top><tt>ftn_msgid</tt><td>FidoNet FTS-9 Message-ID<tr><td align=top><tt>ftn_reply</tt><td>FidoNet FTS-9 Reply-ID<tr><td align=top><tt>ftn_area</tt><td>FidoNet FTS-4 echomail AREA tag<tr><td align=top><tt>ftn_flags</tt><td>FidoNet FSC-53 FLAGS<tr><td align=top><tt>ftn_pid</tt><td>FidoNet FSC-46 Program Identifier<tr><td align=top><tt>ftn_tid</tt><td>FidoNet FSC-46 Tosser Identifier<tr><td align=top><tt>date</tt><td>RFC-822 formatted date/time<tr><td align=top><tt>attr</tt><td>Attribute bitfield<tr><td align=top><tt>auxattr</tt><td>Auxillary attribute bitfield<tr><td align=top><tt>netattr</tt><td>Network attribute bitfield<tr><td align=top><tt>when_written_time</tt><td>Date/time (in time_t format)<tr><td align=top><tt>when_written_zone</tt><td>Time zone<tr><td align=top><tt>when_imported_time</tt><td>Date/time message was imported<tr><td align=top><tt>when_imported_zone</tt><td>Time zone<tr><td align=top><tt>thread_back</tt><td>Message number that this message is a reply to<tr><td align=top><tt>thread_next</tt><td>Message number of the next reply to the original message in this thread<tr><td align=top><tt>thread_first</tt><td>Message number of the first reply to this message<tr><td align=top><tt>field_list[].type</tt><td>Other SMB header fields (type)<tr><td align=top><tt>field_list[].data</tt><td>Other SMB header fields (data)</table><br><i>New in v3.12:</i> The optional <i>client</i> argument is an instance of the <i>Client</i> class to be used for the security log header fields (e.g. sender IP address, hostname, protocol, and port). <br><br><i>New in v3.12:</i> The optional <i>rcpt_list</i> is an array of objects that specifies multiple recipients for a single message (e.g. bulk e-mail). Each object in the array may include the following header properties (described above): <br><i>to</i>, <i>to_ext</i>, <i>to_org</i>, <i>to_net_type</i>, <i>to_net_addr</i>, and <i>to_agent</i>
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>MsgBase</tt>
<a name=MsgBase_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>status</b><td>number
<td>return value of last <i>SMB Library</i> function call - <small>READ ONLY</small>
</table>
<h2><a name=File>File class</a>
<br><font size=-1>Class used for opening, creating, reading, or writing files on the local file system<p>Special features include:</h2><ol type=disc><li>Exclusive-access files (default) or shared files<ol type=circle><li>optional record-locking<li>buffered or non-buffered I/O</ol><li>Support for binary files<ol type=circle><li>native or network byte order (endian)<li>automatic Unix-to-Unix (<i>UUE</i>), yEncode (<i>yEnc</i>) or Base64 encoding/decoding</ol><li>Support for ASCII text files<ol type=circle><li>supports line-based I/O<ol type=square><li>entire file may be read or written as an array of strings<li>individual lines may be read or written one line at a time</ol><li>supports fixed-length records<ol type=square><li>optional end-of-text (<i>etx</i>) character for automatic record padding/termination<li>Synchronet <tt>.dat</tt> files use an <i>etx</i> value of 3 (Ctrl-C)</ol><li>supports <tt>.ini</tt> formated configuration files<ol type=square><li>concept and support of <i>root</i> ini sections added in v3.12</ol><li>optional ROT13 encoding/translation</ol><li>Dynamically-calculated industry standard checksums (e.g. CRC-16, CRC-32, MD5)</ol></font>
</h2>
<p>To create a new File object: <tt>var f = new File(<i>filename</i>)</tt></p>
<table border=1 width=100%>
<caption align=left><b><tt>File</tt>
<a name=File_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>iniSetValue</b><td>boolean<td><tt>File.iniSetValue(section, key, value)
<td>set the specified <i>key</i> to the specified <i>value</i> in the specified <i>section</i> of a <tt>.ini</tt> file. to set a key in the <i>root</i> section, pass <i>null</i> for <i>section</i>. 
<tr valign=top><td><b>iniSetObject</b><td>boolean<td><tt>File.iniSetObject(section, object)
<td>write all the properties of the specified <i>object</i> as separate <tt>key=value</tt> pairs in the specified <i>section</i> of a <tt>.ini</tt> file. to write an object in the <i>root</i> section, pass <i>null</i> for <i>section</i>. 
<tr valign=top><td><b>iniSetAllObjects</b><td>array<td><tt>File.iniSetAllObjects(object array [,name_property])
<td>write an array of objects to a .ini file, each object in its own section named after the object's <i>name_property</i> (default: <tt>name</tt>)
</table>
<h2><a name=Queue>Queue class</a>
<br><font size=-1>Class for bi-directional message queues. Used for inter-thread/module communications.</font>
</h2>
<p>To create a new (named) Queue object: <tt>var q = new Queue(<i>name</i>)</tt></p>
<table border=1 width=100%>
<caption align=left><b><tt>Queue</tt>
<a name=Queue_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>poll</b><td>undefined<td><tt>Queue.poll([timeout])
<td>wait for a value on the queue for up to <i>timeout</i> milliseconds (default: <i>infinite</i>), returns <i>true</i> or the <i>name</i> (string) of the value waiting (if it has one), or <i>false</i> if no values are waiting
<tr valign=top><td><b>read</b><td>undefined<td><tt>Queue.read([name])
<td>read a value from the queue, if <i>name</i> not specified, reads next value from the bottom of the queue
<tr valign=top><td><b>peek</b><td>undefined<td><tt>Queue.peek()
<td>peek at the value at the bottom of the queue
<tr valign=top><td><b>write</b><td>boolean<td><tt>Queue.write(value [,name])
<td>write a value (optionally named) to the queue
</table>
<br>
<table border=1 width=100%>
<caption align=left><b><tt>Queue</tt>
<a name=Queue_properties> properties</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Type</font>
<th align=left>
<font color="white">Description</font>
<tr valign=top><td><b>name</b><td>undefined
<td>name of the queue (if it has one)
<tr valign=top><td><b>data_waiting</b><td>boolean
<td><i>true</i> if data is waiting to be read from queue
<tr valign=top><td><b>read_level</b><td>number
<td>number of values in the read queue
<tr valign=top><td><b>write_level</b><td>number
<td>number of values in the write qeueue
</table>
<h2><a name=Socket>Socket class</a>
<br><font size=-1>Class used for TCP/IP socket communications</font>
</h2>
<p>To create a new Socket object: <tt>load('sockdefs.js'); var s = new Socket(<i>type</i>)</tt><br>where <i>type</i> = <tt>SOCK_STREAM</tt> for TCP (default) or <tt>SOCK_DGRAM</tt> for UDP</p>
<table border=1 width=100%>
<caption align=left><b><tt>Socket</tt>
<a name=Socket_methods> methods</a>
</b></caption>
<tr bgcolor=gray>
<th align=left width=100>
<font color="white">Name</font>
<th align=left width=100>
<font color="white">Returns</font>
<th align=left width=200>
<font color="white">Usage</font>
<th align=left>
<font color="white">Description</font>
</table>
<p><small>
Totals: 12 properties, 16 methods
